var angular = require("angular");
angular
    .module("aboutModule", [])
    .service("aboutDataPool", [
        "sanHttp",
        function(sanHttp) {
            var dataPool = this;
            dataPool.getVersion = getVersion;

            function getVersion(req) {
                return sanHttp.http({
                    method: "post",
                    data: req,
                    url: "https://api.github.com/user"
                });
            }
        }
    ])
    .controller("aboutCtrl", [
        "$scope",
        "aboutDataPool",
        function($scope, dataPool) {
            var
                _vm_ = this;

            init();

            getVersion();

            function getVersion() {
                dataPool.getVersion({
                    user: "santree"
                });
            }

            function init() {
                _vm_.mainText = "这是关于我们页面";
            }
        }
    ]);